import { Link } from '@brillout/docpress'
import { StaticHostDocIntro, StaticHostDocOutro, StaticHostDocStrategies } from '../../components/static-host'
import { Example } from '../../components'

<StaticHostDocIntro
  staticHostLink={<>, such as <a href="https://pages.cloudflare.com/">Cloudflare Pages</a></>}
/>

<StaticHostDocStrategies name="Cloudflare Pages" />

If you let Cloudflare Pages build your app, note that Vike requires Node.js `>=12.19.0` and you may need to change <a href="https://developers.cloudflare.com/pages/platform/build-configuration#language-support-and-tools">Cloudflare Pages' default Node.js version</a>.

<StaticHostDocOutro />

## Wrangler 2 & Cloudflare Worker

With [wrangler v2](https://github.com/cloudflare/wrangler2), you can deploy a Cloudflare Worker (server code) along Cloudflare Pages.

See <Link href="/cloudflare-workers#cloudflare-pages" doNotInferSectionTitle={true} />.

## Examples

Example of using Vike with Cloudflare Pages with a Cloudflare worker:
 - <Example timestamp="2024.01" repo="travis-r6s/vike-cf-pages" /> - Advanced demo showcasing a lot of integrations such as REST, tRPC, GraphQL, Sentry, and Thumbprint.
 - <Example timestamp="2024.01" repo="osseonews/vike-app-cfp" />
 - <Example timestamp="2022.04" repo="Immortalin/vite-plugin-ssr-cloudflare-pages-demo" />
   > vite-plugin-ssr was the [previous name of Vike](https://vite-plugin-ssr.com/vike).
